gdk/surface: Handle clicks outside client surfaces
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 23 Dec 2022 15:04:02 +0000 (16:04 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 23 Dec 2022 15:12:03 +0000 (16:12 +0100)
commite7f798dcf5d53b0216dcd44ac4995a6144053a98
treeae2575ac8fbdfbd7d3bbf847e3546ae025482ef5
parentf6bd63c9ad70936ef0dbfd33853649ae4f6f35e8
gdk/surface: Handle clicks outside client surfaces

The owner_events=TRUE grab makes GDK on X11 see events happening
outside every client window as received on the grab window.
Additionally check that the pointer is inside the grab window
(i.e. it received GDK_CROSSING_NORMAL crossing events for the
core pointer) in order to handle clicks happening outside client
windows.

These new paths are expected to be a no-op on Wayland, and to
also work for touchscreen input on X11, due to emulated pointer
events.
gdk/gdksurface.c
gdk/gdksurfaceprivate.h